const state = {
  main: 0,
  userIfo:null
}

const mutations = {
  DECREMENT_MAIN_COUNTER (state) {
    state.main--
  },
  INCREMENT_MAIN_COUNTER (state) {
    state.main++
  },
  SET_USERINFO(state,value){
    debugger
    state.userIfo=value
  }
}
const getters= {
  getuserInfo(state){
    return state.userIfo;
  },
}
const actions = {
  someAsyncTask ({ commit }) {
    // do something async
    commit('INCREMENT_MAIN_COUNTER')
  },
  setUserInfo({commit},data){
    debugger
    commit("SET_USERINFO", data);
  }
}

export default {
  state,
  mutations,
  actions,
  getters
}
